#pragma once

#include "CmdHandler3.h"

class PointHandler : public CmdHandler3
{
	Q_OBJECT
public:
	Q_INVOKABLE PointHandler();
	~PointHandler();

	virtual void input(const QVariant& data, const QString& rawInput, CommandSource cs) override;
	virtual bool done() const;
	void setPrompt0(const QString& leftPrompt, const QStringList& optionPrompts =  QStringList(), const QStringList& optionInputs = QStringList(), QString defaultOption = QString());
	bool isResultPoint() const;
	osg::Vec3d getPoint() const;
	QString getResultInput() const;
	void reset();
private:
	osg::Vec3d m_result;
	QString m_resultInput;
	bool m_done = false;
	bool m_isResultPoint = true;
	QStringList m_outerOptions;
	QString m_prompt0;
	QString m_defaultOption;
};
